cut=$1
files=$2
grep fBeta $files | grep outmn2d_post_iBeta100 | tr -s ',' ' ' | awk  '{if($16>'$cut') print $1,$14,$15,$16}'                                 

redchiCut=$cut
cutdir=patch_cut_moveaway_$redchiCut
mkdir -p $cutdir

cat >> $cutdir/log <<EOF
$(date)
EOF

for ii in $(grep fBeta $files| grep outmn2d_post_iBeta100 | tr -s ',' ' ' | awk  '{if($16>'$redchiCut') print $1}' | awk -F\: '{print $1}'  );
do
    kk=$(dirname $ii); jj=$(echo $kk | tr -s '/' '.');
    echo $kk  $jj $cutdir;

    mv $kk $cutdir/$jj
    cat >> $cutdir/log <<EOF
$kk                                                                                                                                                                                                                                                         
EOF

done

echo
echo "########################"
echo

ls $cutdir
echo
echo "###########################"

echo

cat $cutdir/log

echo


